<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: gstWebRTC Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classgstWebRTC.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classgstWebRTC-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">gstWebRTC Class Reference<div class="ingroups"><a class="el" href="group__util.html">Utilities Library (jetson-utils)</a> &raquo; <a class="el" href="group__codec.html">Codec</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Static class for common WebRTC utility functions used with GStreamer.  
 <a href="classgstWebRTC.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="gstWebRTC_8h_source.html">gstWebRTC.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgstWebRTC_1_1PeerContext.html">PeerContext</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">GStreamer-specific context for each <a class="el" href="structWebRTCPeer.html" title="Remote peer that has connected.">WebRTCPeer</a>.  <a href="structgstWebRTC_1_1PeerContext.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ad0274bdc609541a95ea16865016ed37a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgstWebRTC.html#ad0274bdc609541a95ea16865016ed37a">onNegotiationNeeded</a> (GstElement *webrtcbin, void *user_data)</td></tr>
<tr class="memdesc:ad0274bdc609541a95ea16865016ed37a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback for handling webrtcbin "on-negotation-needed" signal.  <a href="classgstWebRTC.html#ad0274bdc609541a95ea16865016ed37a">More...</a><br /></td></tr>
<tr class="separator:ad0274bdc609541a95ea16865016ed37a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2490576accc969fd6172ae5804923edc"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgstWebRTC.html#a2490576accc969fd6172ae5804923edc">onCreateOffer</a> (GstPromise *promise, void *user_data)</td></tr>
<tr class="memdesc:a2490576accc969fd6172ae5804923edc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback for handling webrtcbin "create-offer" signal.  <a href="classgstWebRTC.html#a2490576accc969fd6172ae5804923edc">More...</a><br /></td></tr>
<tr class="separator:a2490576accc969fd6172ae5804923edc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40afef4f7e0133472a9dd02760bdc1ac"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgstWebRTC.html#a40afef4f7e0133472a9dd02760bdc1ac">onIceCandidate</a> (GstElement *webrtcbin, uint32_t mline_index, char *candidate, void *user_data)</td></tr>
<tr class="memdesc:a40afef4f7e0133472a9dd02760bdc1ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback for handling webrtcbin "on-ice-candidate" signal.  <a href="classgstWebRTC.html#a40afef4f7e0133472a9dd02760bdc1ac">More...</a><br /></td></tr>
<tr class="separator:a40afef4f7e0133472a9dd02760bdc1ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a729875349e8e813298ea15ceef173a10"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgstWebRTC.html#a729875349e8e813298ea15ceef173a10">onWebsocketMessage</a> (<a class="el" href="structWebRTCPeer.html">WebRTCPeer</a> *peer, const char *message, size_t message_size, void *user_data)</td></tr>
<tr class="memdesc:a729875349e8e813298ea15ceef173a10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle incoming websocket messages from the client.  <a href="classgstWebRTC.html#a729875349e8e813298ea15ceef173a10">More...</a><br /></td></tr>
<tr class="separator:a729875349e8e813298ea15ceef173a10"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Static class for common WebRTC utility functions used with GStreamer. </p>
<p>This gets used internally by gstEncoder/gstDecoder for handling WebRTC streams. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a2490576accc969fd6172ae5804923edc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2490576accc969fd6172ae5804923edc">&#9670;&nbsp;</a></span>onCreateOffer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void gstWebRTC::onCreateOffer </td>
          <td>(</td>
          <td class="paramtype">GstPromise *&#160;</td>
          <td class="paramname"><em>promise</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Callback for handling webrtcbin "create-offer" signal. </p>
<p>This sends an SDP offer to the client. </p>

</div>
</div>
<a id="a40afef4f7e0133472a9dd02760bdc1ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40afef4f7e0133472a9dd02760bdc1ac">&#9670;&nbsp;</a></span>onIceCandidate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void gstWebRTC::onIceCandidate </td>
          <td>(</td>
          <td class="paramtype">GstElement *&#160;</td>
          <td class="paramname"><em>webrtcbin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mline_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>candidate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Callback for handling webrtcbin "on-ice-candidate" signal. </p>
<p>This send an ICE candidate to the client. </p>

</div>
</div>
<a id="ad0274bdc609541a95ea16865016ed37a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0274bdc609541a95ea16865016ed37a">&#9670;&nbsp;</a></span>onNegotiationNeeded()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void gstWebRTC::onNegotiationNeeded </td>
          <td>(</td>
          <td class="paramtype">GstElement *&#160;</td>
          <td class="paramname"><em>webrtcbin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Callback for handling webrtcbin "on-negotation-needed" signal. </p>
<p>It's expected that user_data is set to a <a class="el" href="structWebRTCPeer.html" title="Remote peer that has connected.">WebRTCPeer</a> instance. </p>

</div>
</div>
<a id="a729875349e8e813298ea15ceef173a10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a729875349e8e813298ea15ceef173a10">&#9670;&nbsp;</a></span>onWebsocketMessage()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void gstWebRTC::onWebsocketMessage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structWebRTCPeer.html">WebRTCPeer</a> *&#160;</td>
          <td class="paramname"><em>peer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>message_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Handle incoming websocket messages from the client. </p>
<p>This only handles SDP/ICE messages - it's expected that the caller will handle new peer connecting/closing messages. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>jetson-utils/<a class="el" href="gstWebRTC_8h_source.html">gstWebRTC.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classgstWebRTC.html">gstWebRTC</a></li>
    <li class="footer">Generated on Fri Mar 17 2023 14:29:30 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
